SUBROUTINE writelog
! Copyright (C) 2009-2010 W. Wang 
! License: This file is distributed under the terms of the GNU General Public License.
! Description: ! 
! Revision histoty: Created May 2010  
! Input/output Parameters: 

USE cellinfo 
IMPLICIT NONE
CHARACTER(8) :: logname="LOG.OUT"
INTEGER :: i,j
CHARACTER(24) :: date

OPEN(11,FILE=TRIM(logname))
CALL fdate(date)
WRITE(11,*)date
WRITE(11,*)
WRITE(11,*)"+-------------------------------------------+"
WRITE(11,*)"|            General Parameters             |"
WRITE(11,*)"+-------------------------------------------+"
WRITE(11,*)
WRITE(11,*)"Atomic Species and Fractional-coordinates:"
DO i=1,atoms
WRITE(11,100)atoms_info(i)%atom_symbol,(atoms_info(i)%atom_pos(j),j=1,3)
100 FORMAT (A3,3F13.7)
END DO
WRITE(11,*)
WRITE(11,*)"Lattice vectors:"
WRITE(11,"(3F14.8)")((cell_vector(i,j),i=1,3),j=1,3)
WRITE(11,*)
WRITE(11,*)"Reciprocal vectors:"
WRITE(11,"(3F14.8)")((Recip_vector(i,j),i=1,3),j=1,3)
WRITE(11,*)
WRITE(11,"(A24,F14.8)")"Unit cell volume      :",abs(cell_vol)
WRITE(11,"(A24,F14.8)")"Brillouin zone volume :",abs(recip_vol)

WRITE(11,*)
WRITE(11,"(A9,F8.2)")"Cutoff: ",cutoff
!WRITE(11,*)
WRITE(11,"(A8,3I2)")"Kmesh: ", (kmesh(i),i=1,3)
CLOSE(11)

!Local variables  




RETURN
END SUBROUTINE
